package com.rc.pojo.dto.order;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

@Data
@ApiModel(description = "交易下单表单实体")
public class OrderFormDTO {
    @NotNull
    @Range(min = 0, max = 3)
    @ApiModelProperty("商品类型1活动 2果树认养 3充值")
    private Integer type;

    @ApiModelProperty("商品id")
    private Long itemId;

    @Min(value = 1,message = "购买物品至少要一件")
    @ApiModelProperty("商品数量")
    private Integer num;
}
